home *** CD-ROM | disk | FTP | other *** search
/ Dos/V Magazine 1995 October 15 / CD [VMAG951015].bin / _demo / gambo / yasai.dxr / 00004.ls < prev    next >
Encoding:
Text File  |  1995-02-13  |  9.6 KB  |  405 lines

  1. on startMovie
  2.   global mlyasai, nasuclick, kyuriclick, kyabeclick, tamaclick, soundcheck
  3.   cursor(4)
  4.   puppetSound(0)
  5.   puppetTempo(60)
  6.   set nasuclick to 0
  7.   set kyuriclick to 0
  8.   set kyabeclick to 0
  9.   set tamaclick to 0
  10.   set soundcheck to 0
  11.   set the volume of sound 1 to 160
  12.   set mlyasai to [:]
  13.   set the visible of sprite 48 to 0
  14. end
  15.  
  16. on mtimeout
  17.   puppetSprite(3, 0)
  18.   puppetSprite(4, 0)
  19.   puppetSprite(5, 0)
  20.   puppetSprite(6, 0)
  21.   puppetSprite(48, 0)
  22.   sound fadeOut 1, 30
  23.   go("Fade")
  24. end
  25.  
  26. on mIdle
  27.   puppetSprite(48, 1)
  28.   if the timer >= 90 then
  29.     mchangetext()
  30.     startTimer()
  31.     updateStage()
  32.   else
  33.     nothing()
  34.   end if
  35. end
  36.  
  37. on mchangetext
  38.   if the castNum of sprite 48 = 55 then
  39.     set the castNum of sprite 48 to 54
  40.     set the visible of sprite 48 to 1
  41.   else
  42.     set the castNum of sprite 48 to 55
  43.   end if
  44. end
  45.  
  46. on myasaimovie
  47.   global nasuclick, kyuriclick, kyabeclick, tamaclick
  48.   set a to the mouseCast
  49.   if (a = 15) or (a = 16) or (a = 17) then
  50.     cursor([800, 801])
  51.     set the mouseDownScript to "mNasuclick"
  52.   else
  53.     if (a = 8) or (a = 9) or (a = 10) then
  54.       cursor([800, 801])
  55.       set the mouseDownScript to "mKyuriclick"
  56.     else
  57.       if (a = 22) or (a = 23) or (a = 24) then
  58.         cursor([800, 801])
  59.         set the mouseDownScript to "mKyabeclick"
  60.       else
  61.         if (a = 29) or (a = 30) or (a = 31) then
  62.           cursor([800, 801])
  63.           set the mouseDownScript to "mTamaclick"
  64.         else
  65.           if rollOver(1) then
  66.             cursor([800, 801])
  67.             set the mouseDownScript to EMPTY
  68.           else
  69.             cursor(-1)
  70.             set the mouseDownScript to EMPTY
  71.           end if
  72.         end if
  73.       end if
  74.     end if
  75.   end if
  76.   myasaianim()
  77.   mplaysound()
  78. end
  79.  
  80. on mexit
  81.   set the mouseDownScript to EMPTY
  82.   puppetSprite(3, 0)
  83.   puppetSprite(4, 0)
  84.   puppetSprite(5, 0)
  85.   puppetSprite(6, 0)
  86.   cursor(4)
  87.   go(15)
  88. end
  89.  
  90. on mnasuclick
  91.   global nasuclick, soundcheck
  92.   set the timeoutLapsed to 0
  93.   set the mouseDownScript to EMPTY
  94.   if nasuclick = 0 then
  95.     puppetSprite(5, 1)
  96.     addProp(mlyasai, #nasu, 5)
  97.     set nasuclick to 1
  98.     set soundcheck to soundcheck + 1000
  99.   else
  100.     puppetSprite(5, 0)
  101.     deleteProp(mlyasai, #nasu)
  102.     set nasuclick to 0
  103.     set soundcheck to soundcheck - 1000
  104.   end if
  105. end
  106.  
  107. on mkyuriclick
  108.   global kyuriclick, soundcheck
  109.   set the timeoutLapsed to 0
  110.   set the mouseDownScript to EMPTY
  111.   if kyuriclick = 0 then
  112.     msclickkyu()
  113.     puppetSprite(6, 1)
  114.     addProp(mlyasai, #kyuri, 6)
  115.     set kyuriclick to 1
  116.     set soundcheck to soundcheck + 10
  117.   else
  118.     puppetSprite(6, 0)
  119.     deleteProp(mlyasai, #kyuri)
  120.     set kyuriclick to 0
  121.     set soundcheck to soundcheck - 10
  122.   end if
  123. end
  124.  
  125. on mtamaclick
  126.   global tamaclick, soundcheck
  127.   set the timeoutLapsed to 0
  128.   set the mouseDownScript to EMPTY
  129.   if tamaclick = 0 then
  130.     msclicktama()
  131.     puppetSprite(4, 1)
  132.     addProp(mlyasai, #tama, 4)
  133.     set tamaclick to 1
  134.     set soundcheck to soundcheck + 1
  135.   else
  136.     puppetSprite(4, 0)
  137.     deleteProp(mlyasai, #tama)
  138.     set tamaclick to 0
  139.     set soundcheck to soundcheck - 1
  140.   end if
  141. end
  142.  
  143. on mkyabeclick
  144.   global kyabeclick, soundcheck
  145.   set the timeoutLapsed to 0
  146.   set the mouseDownScript to EMPTY
  147.   if kyabeclick = 0 then
  148.     msclickkyabe()
  149.     puppetSprite(3, 1)
  150.     addProp(mlyasai, #kyabe, 3)
  151.     set kyabeclick to 1
  152.     set soundcheck to soundcheck + 100
  153.   else
  154.     puppetSprite(3, 0)
  155.     deleteProp(mlyasai, #kyabe)
  156.     set kyabeclick to 0
  157.     set soundcheck to soundcheck - 100
  158.   end if
  159. end
  160.  
  161. on myasaianim
  162.   global yasaianim1, yasaianim2, mlyasai
  163.   set n to ticks() - 30
  164.   if (yasaianim1 = 0) and (yasaianim2 < n) then
  165.     updateStage()
  166.     repeat with n in mlyasai
  167.       if n = 5 then
  168.         mnasuguitar1()
  169.         next repeat
  170.       end if
  171.       if n = 6 then
  172.         mkyuripiano1()
  173.         next repeat
  174.       end if
  175.       if n = 4 then
  176.         mtamadrum1()
  177.         next repeat
  178.       end if
  179.       if n = 3 then
  180.         mkyabefue1()
  181.         next repeat
  182.       end if
  183.       nothing()
  184.     end repeat
  185.     set yasaianim1 to 1
  186.     set yasaianim2 to ticks()
  187.     updateStage()
  188.   else
  189.     if (yasaianim1 = 1) and (yasaianim2 < n) then
  190.       repeat with n in mlyasai
  191.         if n = 5 then
  192.           mnasuguitar2()
  193.           next repeat
  194.         end if
  195.         if n = 6 then
  196.           mkyuripiano2()
  197.           next repeat
  198.         end if
  199.         if n = 4 then
  200.           mtamadrum2()
  201.           next repeat
  202.         end if
  203.         if n = 3 then
  204.           mkyabefue2()
  205.           next repeat
  206.         end if
  207.         nothing()
  208.       end repeat
  209.       set yasaianim1 to 0
  210.       set yasaianim2 to ticks()
  211.       updateStage()
  212.     else
  213.       nothing()
  214.     end if
  215.   end if
  216. end
  217.  
  218. on mplaysound
  219.   global soundcheck
  220.   if (soundcheck = 1) and not soundBusy(1) then
  221.     puppetSound("DrumSolo")
  222.     updateStage()
  223.   else
  224.     if (soundcheck = 10) and not soundBusy(1) then
  225.       puppetSound("PianoSolo")
  226.       updateStage()
  227.     else
  228.       if (soundcheck = 100) and not soundBusy(1) then
  229.         puppetSound("FueSolo")
  230.         updateStage()
  231.       else
  232.         if (soundcheck = 1000) and not soundBusy(1) then
  233.           puppetSound("GuitarSolo")
  234.           updateStage()
  235.         else
  236.           if (soundcheck = 1001) and not soundBusy(1) then
  237.             puppetSound("Guitar&Drum")
  238.             updateStage()
  239.           else
  240.             if (soundcheck = 1001) and not soundBusy(1) then
  241.               puppetSound("Guitar&Drum")
  242.               updateStage()
  243.             else
  244.               if (soundcheck = 1010) and not soundBusy(1) then
  245.                 puppetSound("Guitar&Piano")
  246.                 updateStage()
  247.               else
  248.                 if (soundcheck = 1100) and not soundBusy(1) then
  249.                   puppetSound("Guitar&Fue")
  250.                   updateStage()
  251.                 else
  252.                   if (soundcheck = 1011) and not soundBusy(1) then
  253.                     puppetSound("Drum&Guitar&Piano")
  254.                     updateStage()
  255.                   else
  256.                     if (soundcheck = 1101) and not soundBusy(1) then
  257.                       puppetSound("Drum&Guitar&Fue")
  258.                       updateStage()
  259.                     else
  260.                       if (soundcheck = 1110) and not soundBusy(1) then
  261.                         puppetSound("Guitar&Fue&Piano")
  262.                         updateStage()
  263.                       else
  264.                         if (soundcheck = 1111) and not soundBusy(1) then
  265.                           puppetSound("All")
  266.                           updateStage()
  267.                         else
  268.                           if (soundcheck = 11) and not soundBusy(1) then
  269.                             puppetSound("Drum&Piano")
  270.                             updateStage()
  271.                           else
  272.                             if (soundcheck = 101) and not soundBusy(1) then
  273.                               puppetSound("Drum&Fue")
  274.                               updateStage()
  275.                             else
  276.                               if (soundcheck = 110) and not soundBusy(1) then
  277.                                 puppetSound("Piano&Fue")
  278.                                 updateStage()
  279.                               else
  280.                                 if (soundcheck = 111) and not soundBusy(1) then
  281.                                   puppetSound("Drum&Fue&Piano")
  282.                                   updateStage()
  283.                                 else
  284.                                   nothing()
  285.                                 end if
  286.                               end if
  287.                             end if
  288.                           end if
  289.                         end if
  290.                       end if
  291.                     end if
  292.                   end if
  293.                 end if
  294.               end if
  295.             end if
  296.           end if
  297.         end if
  298.       end if
  299.     end if
  300.   end if
  301. end
  302.  
  303. on msclicktama
  304.   global soundcheck
  305.   if soundcheck = 10 then
  306.     puppetSound("Drum&Piano")
  307.     updateStage()
  308.   else
  309.     if soundcheck = 100 then
  310.       puppetSound("Drum&Fue")
  311.       updateStage()
  312.     else
  313.       if soundcheck = 110 then
  314.         puppetSound("Drum&Fue&Piano")
  315.         updateStage()
  316.       else
  317.         puppetSound("DrumSolo")
  318.         updateStage()
  319.       end if
  320.     end if
  321.   end if
  322. end
  323.  
  324. on msclickkyu
  325.   global soundcheck
  326.   if soundcheck = 1 then
  327.     puppetSound("Drum&Piano")
  328.     updateStage()
  329.   else
  330.     if soundcheck = 100 then
  331.       puppetSound("Piano&Fue")
  332.       updateStage()
  333.     else
  334.       if soundcheck = 101 then
  335.         puppetSound("Drum&Fue&Piano")
  336.         updateStage()
  337.       else
  338.         puppetSound("PianoSolo")
  339.         updateStage()
  340.       end if
  341.     end if
  342.   end if
  343. end
  344.  
  345. on msclickkyabe
  346.   global soundcheck
  347.   if soundcheck = 1 then
  348.     puppetSound("Drum&Fue")
  349.     updateStage()
  350.   else
  351.     if soundcheck = 10 then
  352.       puppetSound("Piano&Fue")
  353.       updateStage()
  354.     else
  355.       if soundcheck = 11 then
  356.         puppetSound("Drum&Fue&Piano")
  357.         updateStage()
  358.       else
  359.         puppetSound("FueSolo")
  360.         updateStage()
  361.       end if
  362.     end if
  363.   end if
  364. end
  365.  
  366. on mnasuguitar1
  367.   set the locH of sprite 5 to the locH of sprite 5
  368.   set the castNum of sprite 5 to 16
  369. end
  370.  
  371. on mnasuguitar2
  372.   set the locH of sprite 5 to the locH of sprite 5
  373.   set the castNum of sprite 5 to 17
  374. end
  375.  
  376. on mkyuripiano1
  377.   set the locH of sprite 6 to the locH of sprite 6
  378.   set the castNum of sprite 6 to 9
  379. end
  380.  
  381. on mkyuripiano2
  382.   set the locH of sprite 6 to the locH of sprite 6
  383.   set the castNum of sprite 6 to 10
  384. end
  385.  
  386. on mtamadrum1
  387.   set the locH of sprite 4 to the locH of sprite 4
  388.   set the castNum of sprite 4 to 30
  389. end
  390.  
  391. on mtamadrum2
  392.   set the locH of sprite 4 to the locH of sprite 4
  393.   set the castNum of sprite 4 to 31
  394. end
  395.  
  396. on mkyabefue1
  397.   set the locH of sprite 3 to the locH of sprite 3
  398.   set the castNum of sprite 3 to 23
  399. end
  400.  
  401. on mkyabefue2
  402.   set the locH of sprite 3 to the locH of sprite 3
  403.   set the castNum of sprite 3 to 24
  404. end
  405.